﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sunboxsoft.ASMS.Client.Domain.Calculation
{
    public class PayRecordCalculation
    {
        /// <summary>
        /// 计算总金额
        /// </summary>
        /// <param name="payRecordArray"></param>
        /// <returns></returns>
        public static decimal Calc(WebRef.EPayRecord[] payRecordArray)
        {
            if (payRecordArray == null)
            {
                return 0;
            }

            decimal amount = 0;
            for (int index = 0; index < payRecordArray.Length; index++)
            {
                amount += payRecordArray[index].PayAmount;
            }
            return amount;
        }
    }
}
